package Dame;

import java.util.Arrays;

public class bubbling {
    public static void main(String[] args) {
        int arr [] = {5,6,7,8,12,3,4,5,9,1,2};
        for (int i = 0; i < arr.length-1; i++) {
            for (int i1 = 0; i1 < arr.length-1; i1++) {
                if (arr[i1]>arr[i1+1]){
                    int temp = arr[i1];
                    arr[i1]=arr[i1+1];
                    arr[i1+1]=temp;
                }
            }
        }
        System.out.println(Arrays.toString(arr));
    }
}
